<?php

namespace App\Vilidate;

/**
 * user控制器下的验证规则类
 */
class TagController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];


    public $create = [
        'rule'=>[
            'name' => 'required|string',
            'sort' => 'required|integer',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'sort.required' => '排序不能为空',
            'name.string' => '名字为字符串',
            'sort.integer' => '排序应为整数',
        ]
    ];

    public $update = [
        'rule'=>[
            'name' => 'required|string',
            'sort' => 'required|integer',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'sort.required' => '排序不能为空',
            'name.string' => '名字为字符串',
            'sort.integer' => '排序应为整数',
        ]
    ];

}